package homework.homework01_1;
@FunctionalInterface
interface Calc{
    //默认被public abstract修饰
    int sum(int a, int b);
}
public class Test02 {
    public static void main(String[] args) {
        show(new Calc() {
            @Override
            public int sum(int a, int b) {
                return a + b;
            }
        });
        show(( a,  b) -> a + b);

    }

    //定义show方法
    public static void show(Calc calc){
        int sum = calc.sum(10, 20);
        System.out.println(sum);
    }
}
